Add support for GPT-5.5 via Azure Foundry#613
Conversation
- Added GPT-5.5 to ModelSelectionForm with premium badge and description. - Implemented GPT-5.5 initialization in getModel using Azure OpenAI provider. - Configured AZURE_ENDPOINT, AZURE_API_KEY, and AZURE_DEPLOYMENT_NAME environment variables. - Updated .env.local.example with new Azure configuration. Co-authored-by: ngoiyaeric <115367894+ngoiyaeric@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (11)
WalkthroughAdds GPT-5.5 as a selectable model with Azure OpenAI placeholders in the example env, updates the settings UI option, and extends getModel() to read Azure env vars, initialize an Azure OpenAI client for GPT-5.5, and change provider fallback order (Azure → Gemini → xAI) with a final OpenAI guard. ChangesGPT-5.5 Model Support with Azure Integration
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
|
There was a problem hiding this comment.
add azure as the first option here
There was a problem hiding this comment.
I've moved Azure (GPT-5.5) to be the first option in the default fallback behavior in lib/utils/index.ts.
Acknowledged. I've updated the model fallback order as requested. |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: Length of output: 5329 🏁 Script executed: Length of output: 4919
Here's the plan:
The requested changes have been implemented and a pull request has been created: View PR |
- Moved Azure (GPT-5.5) to be the first option in the default fallback chain in getModel. - Maintained support for selecting GPT-5.5 explicitly via UI settings. Co-authored-by: ngoiyaeric <115367894+ngoiyaeric@users.noreply.github.com>
- Integrated GPT-5.5 via Azure Foundry with premium branding. - Refactored getModel in lib/utils/index.ts for better clarity and robust error handling. - Set Azure (GPT-5.5) as the primary provider in the fallback chain. - Added comprehensive Azure AI configuration to .env.local.example. Co-authored-by: ngoiyaeric <115367894+ngoiyaeric@users.noreply.github.com>
|
@coderabbitai plan 2026-05-15 10:02:48.398 [error] getSystemPrompt: Error: TypeError: Cannot read properties of undefined (reading 'searchParams') ⨯ TypeError: Cannot read properties of undefined (reading 'call') |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: Length of output: 6877 🏁 Script executed: Length of output: 20759 🏁 Script executed: Length of output: 6268
Root Cause
That same
Fix: Move
|
- Refactored getModel in lib/utils/index.ts for better readability and robust error handling. - Established Azure AI Foundry (GPT-5.5) as the primary provider in the default fallback chain. - Integrated GPT-5.5 into the model selection UI with appropriate metadata. - Updated .env.local.example with necessary Azure configuration. - Removed redundant try-catch blocks and debug artifacts. Co-authored-by: ngoiyaeric <115367894+ngoiyaeric@users.noreply.github.com>
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
lib/utils/index.ts (1)
3-7:⚠️ Potential issue | 🔴 Critical | 🏗️ Heavy liftMove
getModelout of the shared utils barrel.Line 3 imports
getSelectedModelfrom@/lib/actions/users, and lines 4-7 add all provider SDK imports; lines 24-135 exportgetModel()which uses both. This reintroduces the server/client boundary break: any client import of@/lib/utils(which 35+ client components do) will transitively pull in server-only code and all AI provider SDKs into the client bundle. MovegetModel()and the AI provider imports into a server-only module.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@lib/utils/index.ts` around lines 3 - 7, The shared utils barrel exports getModel() and imports server-only AI SDKs (createOpenAI, createGoogleGenerativeAI, createAmazonBedrock, createXai) which causes server-only code to be bundled into client components; move getModel() and all AI provider imports out of lib/utils/index.ts into a new server-only module (e.g., lib/server/getModel.ts), update getModel() to import getSelectedModel from '@/lib/actions/users' inside that server-only file, and change all call sites that used getModel from the shared utils to import it from the new server-only module so client components no longer transitively import server SDKs.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@lib/utils/index.ts`:
- Around line 64-67: The switch branch for getModel() handling the case
'GPT-5.1' incorrectly returns the 'gpt-4o' client; update the 'GPT-5.1' case in
lib/utils/index.ts (the getModel() switch) to return/create the correct model
identifier 'gpt-5.1' (i.e., call/create the OpenAI client with 'gpt-5.1' or
return that model string), or if GPT-5.1 is not supported remove the 'GPT-5.1'
option from the UI (components/settings/components/model-selection-form.tsx) to
keep selections consistent.
---
Outside diff comments:
In `@lib/utils/index.ts`:
- Around line 3-7: The shared utils barrel exports getModel() and imports
server-only AI SDKs (createOpenAI, createGoogleGenerativeAI,
createAmazonBedrock, createXai) which causes server-only code to be bundled into
client components; move getModel() and all AI provider imports out of
lib/utils/index.ts into a new server-only module (e.g., lib/server/getModel.ts),
update getModel() to import getSelectedModel from '@/lib/actions/users' inside
that server-only file, and change all call sites that used getModel from the
shared utils to import it from the new server-only module so client components
no longer transitively import server SDKs.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 0f18b0e5-ef57-4be2-94a1-aee8f89b5031
📒 Files selected for processing (1)
lib/utils/index.ts
| case 'GPT-5.1': | ||
| if (openaiApiKey) { | ||
| const openai = createOpenAI({ | ||
| apiKey: openaiApiKey, | ||
| }); | ||
| const openai = createOpenAI({ apiKey: openaiApiKey }); | ||
| return openai('gpt-4o'); |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
rg -n -C2 "GPT-5\.1|gpt-4o" components libRepository: QueueLab/QCX
Length of output: 1339
🏁 Script executed:
rg -n "GPT-5" components lib --type ts --type tsx -B 2 -A 2Repository: QueueLab/QCX
Length of output: 84
🏁 Script executed:
rg -n "5\.1|5.1" lib --type ts -B 1 -A 1Repository: QueueLab/QCX
Length of output: 406
🏁 Script executed:
fd -e json -e yaml -e config | head -20Repository: QueueLab/QCX
Length of output: 315
🏁 Script executed:
cat -n config/model.jsonRepository: QueueLab/QCX
Length of output: 105
🏁 Script executed:
sed -n '50,80p' lib/utils/index.tsRepository: QueueLab/QCX
Length of output: 1069
🏁 Script executed:
sed -n '1,100p' lib/utils/index.ts | head -100Repository: QueueLab/QCX
Length of output: 3541
🏁 Script executed:
rg -n "gpt-4o|gpt-5" . --type ts -iRepository: QueueLab/QCX
Length of output: 916
GPT-5.1 case returns gpt-4o instead of the selected model.
When a user selects "GPT-5.1" from the model selection UI (components/settings/components/model-selection-form.tsx:54-55), the getModel() function silently serves gpt-4o instead (lib/utils/index.ts:67). This creates a mismatch between what the UI advertises and what is actually returned. Change line 67 to return the correct model identifier (gpt-5.1) or remove the GPT-5.1 option from the UI if it is not intended.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@lib/utils/index.ts` around lines 64 - 67, The switch branch for getModel()
handling the case 'GPT-5.1' incorrectly returns the 'gpt-4o' client; update the
'GPT-5.1' case in lib/utils/index.ts (the getModel() switch) to return/create
the correct model identifier 'gpt-5.1' (i.e., call/create the OpenAI client with
'gpt-5.1' or return that model string), or if GPT-5.1 is not supported remove
the 'GPT-5.1' option from the UI
(components/settings/components/model-selection-form.tsx) to keep selections
consistent.
- Added GPT-5.5 to the ModelSelectionForm UI. - Created lib/utils/model.ts and refactored getModel to support Azure Foundry. - Prioritized Azure in the model fallback chain. - Fixed Next.js 15 async cookies issue in lib/auth/get-current-user.ts. - Updated all agent import paths for getModel. - Updated .env.local.example with Azure configuration variables. Co-authored-by: ngoiyaeric <115367894+ngoiyaeric@users.noreply.github.com>
This PR adds support for the new GPT-5.5 model, which is hosted via Azure Foundry (Azure OpenAI-compatible).
Changes:
components/settings/components/model-selection-form.tsx.lib/utils/index.tsto handle theGPT-5.5model selection by initializing an OpenAI provider with the custom Azure endpoint and API key.AZURE_ENDPOINT,AZURE_API_KEY, andAZURE_DEPLOYMENT_NAMEin.env.local.example.Verification:
PR created automatically by Jules for task 3548606824986651974 started by @ngoiyaeric
Summary by CodeRabbit